<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        const PI = 3.1415926
        // 声明之后不可更改
        PI = 3.14 // Uncaught TypeError: Assignment to constant variable.
        console.log(PI)

        // 常量必须初始化 
        const M // Uncaught SyntaxError: Missing initializer in const declaration
    </script>
</body>

</html>